package br.inf.ufrgs.usixml4cdc.utils;

import br.inf.ufrgs.usixml4cdc.exceptions.ParsingErrorException;

public class PrimitiveElementParser {
	
	public boolean parseBoolean(String bool) 
		throws ParsingErrorException{
		if (bool.equals("true")){
			return true;
		}else if (bool.equals("false")){
			return false;
		}else{
			throw new ParsingErrorException("Invalid boolean argument");
		}
	}


}
